<head>
    <style media="screen" type="text/css">

    #mitabla{
/*estilo de el cuerpo de nuestra tabla*/
border: 1px solid #ccc;
background-color: #1e8cbe;
width:80%;
margin:24px auto;
border-left: 1px solid #ccc;
border-right: 1px solid #ccc;
font-family:helvetica,arial,sans-serif;
font-weight:normal;
text-align: center;
    }

#mitabla th{
/*estilo de los elementos(th)*/
border: 1px solid #000;
background-color: grey;
color:#fff;
font-weight: normal;
font-size:14px;
padding: 8px;
text-align: center;
}

#mitabla td{

/*estilo a los elementos (td)*/
width:100px;
height: 24px;
}

/*Aqui esta la magia ahora vamos usar el  nth-child() */

#mitabla tr:nth-child(odd){

/*para los colores de las filas impares*/
background-color: #FFF;
}

#mitabla tr:nth-child(even){

/*para los colores de las filas pares*/
background:#DDD;
}

    </style>
</head>

<h1><?php echo $this->titulo;?></h1>

<!-- <div class="jumbotron"> -->



	<table id="mitabla">
	<thead>
            <th>Mesa de Entrada</th>
            <?php
            
            if ($this->rol>2){
                echo '<th>Cedula</th>'; 
                echo '<th>Alumno</th>';
                }
                ?>
	    
            <th>Fecha</th>
            <th>Tipo</th>
            <th>Estado</th>
            <th>Visualizar</th>
        
        
        </thead>
        <tbody>
            <?php
            
    foreach($this->datos as $dato)
    {
        
                    switch ($dato["estado_solicitud"]){
                        case 1: $est_sol='Pendiente'; break;
                        case 2: $est_sol='Delegada'; break;
                        case 3: $est_sol='Falta visto bueno'; break;
                        case 4: $est_sol='Resuelta'; break;
                        case 5: $est_sol='Anulada'; break;
                        
                    }
        
        ?>
        <tr>
            
            <?php 
            if ($this->rol>2){
                echo '<td>';
                if ($dato[$this->estado_actor]== 1  ) echo "* ";
                echo $dato["mesa_entrada"].'</td>';
                echo '<td>'.$dato["cedula"].'</td>';
            
                echo '<td>'.$dato["nombre"].' '.$dato["apellido"].'</td>';
                }else {echo '<td>'.$dato["mesa_entrada"].'</td>';}
                
        ?>
            
            <td><?php echo $dato["fecha_de_redaccion"]?></td>
            <td><?php echo $dato["nombre_tipo_solicitud"]?></td>
            <td><?php echo $est_sol ?></td>
            <td><?php $form = $this->form; $form->prepare(); 
		if ($this->rol == 3 ){                  
  		$form->setAttributes(array(
                      'action' => $this->url.'/application/formulario/formulariorec',
                      'method' => 'post'
                  ));
		}elseif($this->rol >= 4 && $this->rol <= 6){
  		$form->setAttributes(array(
                      'action' => $this->url.'/application/formulario/formulariosec',
                      'method' => 'post'
                  ));		

		}elseif($this->rol >= 7 && $this->rol <= 9){
  		$form->setAttributes(array(
                      'action' => $this->url.'/application/formulario/formulariodir',
                      'method' => 'post'
                  ));		
		}
                  $formLabel = $this->plugin('formLabel');
                  $form->get('mesa_oculto')->setAttribute("value",$dato["mesa_entrada"]);
                  echo $this->form()->openTag($form);
                  echo $this->formHidden($form->get('mesa_oculto'));
//                  echo $this->formHidden($form->get('id_oculto'));
//                  echo $this->formHidden($form->get('rol_oculto'));                  
                  echo $this->formElement($form->get('Ver'));
                  echo $this->form()->closeTag();
                  ?>
	</td>
        </tr>
    <?php
    }
?>
        </tbody>
        </table>
    

	
<!-- </div> -->
